package com.tcm.prescribe.mapper;


import com.tcm.prescribe.api.domain.entity.Prescribe;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PrescribeMapper {

    int deleteById(Long id);

    int deleteLogicById(Long id);

    int insert(Prescribe record);

    Prescribe findById(Long id);

    int verifyPass(Long id);

    int verifyRefused(@Param("id") Long id, @Param("remark") String remark);

    int changeUsed(Long id);

    List<Prescribe> listUserPrescribePage(@Param("userId") Long userId, @Param("offset") Long offset, @Param("pagesize") Long pagesize);

    Long countUserPrescribe(Long userId);

    List<Prescribe> listDoctorPrescribePage(@Param("doctorId") Long doctorId, @Param("offset") Long offset, @Param("pagesize") Long pagesize);

    Long countDoctorPrescribe(Long doctorId);

    int update(Prescribe record);
}